import 'dart:core';

extension IterableEx<E> on Iterable<E> {
  void forEachAsIndex(void f(E element, int index)) {
    int index = 0;
    for (E element in this) {
      f(element, index);
      index++;
    }
  }
}
